package mathproblem;
import java.lang.Math;


class Define {
	private double radius;
	private double high;
	private double area;
	private double volume;
	private String type;
	double pi=3.14;
	public Define(){}
	public Define(double radius,double high,String type){
		this.radius=radius;
		this.high=high;
		this.type=type;
	}
	public double getRadius(){
		return radius;
	}
	public void setRadius(double radius){
		this.radius=radius;
	}
	
	public double getHigh(){
		return high;
	}
	public void setHigh(double high){
		this.high=high;
	}
	
	public double getArea(){
		return area;
	}
	public void setArea(double area){
		this.area=area;
	}
	public String getType(){
		return type;
	}
	public void setType(String type){
		this.type=type;
	}
	public double getVolume(){
		return volume;
	}
	public void setVolume(double volume){
		this.volume=volume;
	}
	
	public double cylinderv(double radius,double high){
		volume=pi*radius*radius*high;
		return volume;
	}
	public double cylindera(double radius,double high){
		if(radius!=0&&high!=0){
			area=2*pi*radius*(radius+high);			
		}
		return area;
	}

	public double conev(double radius,double high){
		volume=(1.0/3.0)*(pi*radius*radius)*high;
		return volume;
	}
	public double conea(double radius,double high){
		if(radius!=0&&high!=0){
			double length=radius*radius+high*high;
			double l=Math.sqrt(length);
			area=pi*radius*(radius+l);
			}
		return area;
	}

	public double ballv(double radius){
		volume=(4.0/3.0)*pi*radius*radius*radius;
		return volume;
	}
	public double balla(double radius){
		area=4*pi*radius*radius;
		return area;
	}

}
